package com.spi.interfaces;

import com.spi.interfaces.spi.SPIClassLoad;
import com.spi.sdk.service.PayService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class SPIApplication implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(SPIApplication.class);
    }

    @Override
    public void run(String... args) throws Exception {
        PayService payService = (PayService) new SPIClassLoad().load(PayService.class);
        payService.payment();
    }
}
